var _ajax = require('../../utils/ajax');
var _Server = require('../../utils/server');
var WxParse = require('../../wxParse/wxParse'); // 富文本转化插件
Page({

    /**
     * 页面的初始数据
     */
    data: {

    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        var that = this;
        var studentId = options.studentId;
        _ajax.homeStudentInfo(studentId, function (data) {
            if (data.code == 0) {
                var data = data.data;
                that.setData({
                    indexData: data,
                    indexUrl: _Server.url
                });
                var article = data.content;
                WxParse.wxParse('article', 'html', article, that, 5);
            }
        }, this);
    },
})